package com.example.jdksevendemo.service.impl;

import com.example.jdksevendemo.service.CopyFileService;
import com.example.jdksevendemo.util.FileUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
@Slf4j
public class CopyFileServiceImpl implements CopyFileService {
    @Autowired
    private FileUtil fileUtil;

    @Override
    public void copyDirOrFile(String sourcePath, String newPath){
        try {
            fileUtil.copyDirOrFile(sourcePath, newPath);
        }catch (Exception e){
            e.printStackTrace();
        }
    }


}
